package proj.server;

import java.beans.XMLEncoder;
import java.io.FileOutputStream;
import java.util.*;

import proj.common.Novel;

public class InitNovel {

	public static void main(String[] args) {
		final String NOVEL_NAME = "server/novels.xml";
		List<Novel> novels = new ArrayList<>();
		novels.add(new Novel("xx", "xxx"));
		novels.add(new Novel("xx", "xxx"));
		novels.add(new Novel("xx", "xxx"));
		try {
			XMLEncoder xe = new XMLEncoder(new FileOutputStream(NOVEL_NAME));
			xe.writeObject(novels);
			xe.close();
		} catch (Exception e) {
			// TODO 自动生成的 catch 块
			e.printStackTrace();
		}

	}

}
